/*
 * Copyright (c) Huawei Technologies Co., Ltd. 2021-2021.
 * Description: support to read acpi data after acpi_subsystem_init()
 * Author: yangzhuahao
 * Create: 2021-01-30
 */
#ifndef ACPI_OP_H
#define ACPI_OP_H

#include <linux/acpi.h>
#ifdef CONFIG_RTOS_DROL
#include <linux/hal/drol.h>
#endif

#ifdef CONFIG_RTOS_HAL_ACPI_OP

int acpi_getprop_u32(unsigned int *prop, struct acpi_device *device, const char *name);
int acpi_getprop_u64(unsigned long long *prop, struct acpi_device *device, const char *name);
int acpi_reg_match_string(struct acpi_device *device, const char *name, const char *string);
void acpi_get_acpi_device(acpi_handle handle, struct acpi_device *device, const char *hid);
#ifdef CONFIG_RTOS_DROL
int acpi_reg_get_op(struct acpi_device *dev, const char *name, struct drol_op *op, int op_size);
#endif

#else
static inline int acpi_getprop_u32(unsigned int *prop, struct acpi_device *device, const char *name)
{
	return 0;
}
static inline int acpi_getprop_u64(unsigned long long *prop, struct acpi_device *device, const char *name)
{
	return 0;
}
static inline int acpi_reg_match_string(struct acpi_device *device, const char *name, const char *string)
{
	return 0;
}
static inline void acpi_get_acpi_device(acpi_handle handle, struct acpi_device *device, const char *hid) {}

#ifdef CONFIG_RTOS_DROL
static inline int acpi_reg_get_op(struct acpi_device *dev, const char *name, struct drol_op *op, int op_size)
{
	return 0;
}
#endif

#endif

#endif
